package com.py.credit.clean.code;

import org.apache.commons.lang3.StringUtils;

/**
 * 当前状态校验
 * @author Administrator
 *
 */
public class DqztCheck {
	 /**
     * 校验规则
     */
    public static final String A = "1";
    public static final String B = "2";
    public static final String C = "有效";
    public static final String D = "无效";
	public boolean run(String data,String extend){
		  if (StringUtils.isEmpty(data.trim())) {
	            return false;
	        }
	        try {
	            return checkDqzt(data);
	        } catch (Exception e) {
	            return false;
	        }
       
    }
	 private boolean checkDqzt(String data) {
	        if (data.equals(A) || data.equals(B) || data.equals(C) || data.equals(D)) {
	            return true;
	        }else {
	            return false;
	        }
	    }
}
